package com.xiangyang.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import javax.swing.*;

@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@TableName(value = "employee")
public class Employee extends BaseEntity {
    @TableId(value = "employee_id", type = IdType.AUTO)
    private Long employeeId;    // 医生id
    private Long employeeNumber; // 工号
    private String userName;  // 医生姓名
    private String userSex;   // 性别
    private Long userAge;     // 年龄
    private String phone;     // 电话
    private Long experience;  // 工作年限
    private String posts;     // 职位
    private Long grade;       // 职称
    private Long departmentId;// 科室id
    private String idCard;    // 身份证号
    private String address;   // 住址


    @Override
    public Long getId() {
        return getEmployeeId();
    }
    @Override
    public void setId(Long id) {
        setEmployeeId(id);
    }

    public void setEmployeeId(Long employeeId) {
        this.employeeId = employeeId;
        // 同步设置 BaseEntity 的 id
        super.setId(employeeId);
    }

}


